import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import path from "path";
import versionFile from "purple-version-vite";

// https://vitejs.dev/config/
export default defineConfig({
  build: {
    outDir: "home",
  },

  plugins: [react(), versionFile()],

  resolve: {
    alias: {
      "@": path.resolve(__dirname, "src"), // 将 @ 别名指向 src 目录
      components: path.resolve(__dirname, "src/components"), // 将 components 别名指向 src/components 目录
      utils: path.resolve(__dirname, "src/utils"), // 将 utils 别名指向 src/utils 目录
      assets: path.resolve(__dirname, "src/assets"), // 将 utils 别名指向 src/utils 目录
    },
  },
});
